/*
 * This file is part of WebCL – JavaScript bindings for OpenCL
 * http://webcl.nokiaresearch.com/
 *
 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
 *
 * Contact: Jari Nikara  ;jari.nikara@nokia.com;
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 *
 * The package is based on a published Khronos OpenCL 1.1 Specification,
 * see http://www.khronos.org/opencl/.
 *
 * OpenCL is a trademark of Apple Inc.
 */

/** \interface IWebCLPlatform
 * IWebCLPlatform interface abstracts a WebCL platform.
 * \see cl_platform_id
 */

#include "nsISupports.idl"
#include "nsISecurityCheckedComponent.idl"
#include "nsIVariant.idl"

#include "WebCL_types.idl"

[scriptable, uuid(6ab8b8cf-4d87-40a0-af8a-cc0bf5251fa3)]
interface IWebCLPlatform : nsISecurityCheckedComponent
{
  /** Get platform info.
   * \param aName Name of the info parameter.
   * \return The resulting value.
   * \see clGetPlatformInfo
   * \see WebCL_types
   */
  [implicit_jscontext]
  nsIVariant getPlatformInfo (in long aName);

  /** Obtain the list of devices available on a platform.
   * \param aType A bitfield that identifies the type of OpenCL device.
   * \return Array of IWebCLDevice instances.
   * \see clGetDeviceIDs
   */
  [implicit_jscontext]
  nsIVariant getDeviceIDs (in T_WebCLDeviceType aType);

  [implicit_jscontext]
  nsIVariant getDevices (in T_WebCLDeviceType aType);
};
